$(function () {
  //手机端菜单状态 false未展开 true展开
  let caidan_state = false;
  //手机端菜单点击事件

  $(".phone-nav").click(function () {
    caidan_state = !caidan_state;
    console.log(caidan_state);
    if (caidan_state) {
      $(".phone-nav").addClass("phone-nav-actived");
      $("#caidan").removeClass("icon-caidan").addClass("icon-guanbi");
    } else {
      $(".phone-nav").removeClass("phone-nav-actived");
      $("#caidan").removeClass("icon-guanbi").addClass("icon-caidan");
    }
  });

  let bookings = gsap.utils.toArray(".booking");
  let book_infos = gsap.utils.toArray(".book-info")
  bookings.forEach((booking,index) => {
    booking.addEventListener("click", () => {
      gsap.to(book_infos[index], {
        y: 0,
      });
      book_infos[index].addEventListener("mouseleave",()=>{
        gsap.to(book_infos[index], {
          y: "110%",
        });
      })
    });
    
  });

});
